package com.usian.common.model.course;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Transient;
import java.util.Date;

/**
 * @projectName: day05_mohongwei_parent
 * @package: com.jiyun.common.model
 * @className: Course
 * @author: 莫洪维
 * @email: 1204315800@qq.com
 * @description: TODO
 * @date: 2023/8/4 9:49
 */
@Data
@ToString
@TableName(value = "course")
public class Course {
    @TableId(value = "id",type = IdType.AUTO)
    private Long id;
    @TableField(value = "course_img")
    private String courseImg;
    @TableField(value = "course_name")
    private String courseName;
    @TableField(value = "study_number")
    private Integer studyNumber;
    @TableField(value = "like_number")
    private Integer likeNumber;
    @TableField(value = "user_id")
    private Long userId;
    @TableField(value = "course_sort")
    private String courseSort;
    @TableField(value = "course_status")
    private String courseStatus;
    @TableField(value = "course_info")
    private String courseInfo;
    @TableField(value = "create_date")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "Asia/Shanghai")
    private Date createDate;
    @TableField(value = "is_delete")
    private Integer isDelete;

    //标签ID
    @Transient
    @TableField(exist = false)
    private String labelIds;
}
